Release Notes Table of Contents     Release Notes Index

The Kernel Kit


Images

Declared in: kernel/image.h


Memory , Initialization , and , Termination , Routines

                                                         
  

#define B_INIT_BEFORE_FUNCTION_NAME "initialize_before"

#define B_INIT_AFTER_FUNCTION_NAME "initialize_after"

#define B_TERM_BEFORE_FUNCTION_NAME "terminate_before"

#define B_TERM_AFTER_FUNCTION_NAME "terminate_after"

x86 only!

The quoted strings are the names of the functions that are called just before and just after a chunk of memory is initialized, and just before and just after the memory is freed. You can provide your own initialization and termination routines by implementing functions with these names. The functions take no arguments and return void.

The "B_" symbols that represent the names are placeholders—they're not used anywhere in the BeOS.


get_cpuid(), cpuid_info

Declared in: kernel/OS.h

There have been changes to the (undocumented) get_cpuid() function and cpuid_info structure. However, the call and structure will be replaced by a higher-level API in a later release. If you use the current versions, you may have to rewrite your code when these versions are retired.


on_exit_thread(), exit_thread_func

Declared in: kernel/OS.h
                                                         
  

status_t on_exit_thread(exit_thread_func func, void *data)

typedef void (*exit_thread_func) (void *);

on_exit_thread() lets you register an "exit thread" function that's called after the this thread has been stopped, but just before it exits entirely. The data argument is passed to func when the latter is called.

Note that func is registered as the exit function for the thread that calls on_exit_thread(), displacing any previously registered functions. The exit function is called in the exiting thread's context.

RETURN CODES


Release Notes Table of Contents     Release Notes Index


The Be Book,
...in lovely HTML...
for BeOS Release 5.

Copyright © 2000 Be, Inc. All rights reserved..